package models

type ArticleResource struct {
	ArticleResourceId,ArticleId,Sort,Rid  int
	CreateTime string
}

type ArticleIds struct {
	ArticleId int
}

func GetArticleResource(rid int) (articleIds []ArticleIds) {
	db.Table("article_resource").Where(ArticleResource{Rid: rid}).Select("article_id").Scan(&articleIds)
	return
}

type ArticleType struct {
	AtTypeId, Status int
	Cnname, Enname string
}

func GetArticleResourceType(typeId int) (articleType ArticleType) {
	db.Table("article_type").Where(ArticleType{AtTypeId:typeId}).Find(&articleType)
	return
}
